set(GLOW_BACKENDS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/Backends")
file(GLOB subdirs RELATIVE "${GLOW_BACKENDS_DIR}" "${GLOW_BACKENDS_DIR}/*")
foreach(object ${subdirs})
  if(IS_DIRECTORY "${GLOW_BACKENDS_DIR}/${object}")
    set(backendEnabled "GLOW_WITH_${object}")
    string(TOUPPER "${backendEnabled}" backendEnabled)
    if(NOT DEFINED ${backendEnabled} OR ${backendEnabled})
      list(APPEND GLOW_BACKENDS "${object}")
    endif()
  endif()
endforeach()
